package chapter10.practice6.package3;

import chapter10.practice6.package1.Reader;
import chapter10.practice6.package2.Outer;

/**
 * Created by yangliwei on 2017/10/20.
 */
public class OuterChild extends Outer {
    public Reader getInner(){
        //必需设置Outer.Inner的构造函数的访问权限为public，默认为protected
        return new Inner();
    }

    public static void main(String[] args) {
        OuterChild outerChild = new OuterChild();
        outerChild.setItem("I'm shagou");
        Reader reader = outerChild.getInner();
        System.out.println(reader.read());
    }
}
